﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
    <!--[if lt IE 9]>
    <link href="@Url.Content("~/Content/CSS/IE8.css")" rel="Stylesheet" type="text/css" />
    <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js" type="text/javascript"></script>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
    <![endif]-->
</head>
<body>
<header>
    @{
        bool isAuthenticated = Request.IsAuthenticated;
        string currentPage = "/";
        if (Request.RawUrl.StartsWith("/Login") == false)
        {
            currentPage = Url.Encode(Request.RawUrl); 
        }
    }
    <div id="topMenuContainer">
        <nav id="topMenu">
            <ul>
                @{
                    if (!isAuthenticated)
                    {
                        <li>@Html.ActionLink("로그인", "Index", "Login", new { returnUrl = currentPage }, new { })</li>
                    }
                }
                @if(isAuthenticated)
                {
                    <li>@Html.ActionLink("로그아웃", "LogOut", "Login", new { returnUrl = currentPage }, new { id = "logout" })</li>
                }
            </ul>
        </nav>
    </div>
    <div id="mainBox">
        <a id="logo" href="/"><img src="/Content/image/logo.png" alt="logo" /></a>
        <form id="search" method="get" action="/Search">
            <input id="searchBox" type="text" name="query" />
            <input id="searchButton" type="submit" value="검색" />
        </form>
    </div>
    <nav>
        <ul id="mainMenu">
            <li>@Html.ActionLink("질문 목록", "Index", "Questions")</li>
            <li id="ask">@Html.ActionLink("질문하기", "Write", "Questions")</li>
        </ul>
    </nav>
</header>
<div class=clr></div>
<section id="content">
    @RenderBody()
</section>
<div class=clr></div>
<footer>
<div id="footerWrap">
    <nav id="bottomMenu">
    
        <ul>
            <li><img src="/Content/image/facebook-small-logo.png" alt="facebook logo"/><a href="http://www.facebook.com/nullpointrcom">페이스북</a></li>
            <li><img src="/Content/image/twitter-small-logo.png" alt="twitter logo" /><a href="https://twitter.com/#!/nullpointr1">트위터</a></li>
            <li><img src="/Content/image/open-cast-small-logo.png" alt="opencast logo" /><a href="http://opencast.naver.com/NP469">오픈캐스트</a></li>
        </ul>
    </nav>
    <div class="clear"></div>
    <div id="copyright">
        <p>site logo ⓒ 2012 MasoQna</p>
    </div>
</div>
</footer>
</body>
</html>
